function s_var = config_var
%function s_var = config_var
%
% s_var = struct( ...
%             'filetype', filetype, ...
%             'matfile', matfile, ...
%             'matdims', matdims, ...
%             'file', file, ...
%             'change_miss', change_miss, ...
%             'new_miss', new_miss, ...
%             'varid', varid, ...
%             'autolimits', autolimits, ...
%             'limits', limits, ...
%             'limitslabels', limitslabels, ...
%             'scaleunits', scaleunits, ...
%             'autoatt', autoatt, ...
%             'varname', varname, ...
%             'units', units, ...
%             'colormap_type', colormap_type, ...
%             'shading_type', shading_type, ...
%             'stride', stride);

filetype = 'cdf'; % 'mat' or 'cdf'
matfile = 'meanOpModel.mat'; % y, x, z
matdims = 3; %1d 2d 3d 4d etc ...
file = 'mean_Portugal_Waterproperties.nc';
%file = '\\192.168.23.151\homes\Projects\netcdf\datasets\20061227_Portugal_Hydrodynamic.nc';
%file =
%'http://data.mohid.com/opendap/nph-dods/mercator-ist/Portugal/20061227_Portugal_Hydrodynamic.nc';
%netcdf acess stuff
change_miss = 2;
new_miss = 0;

varid = 'salinity';

%Color limits, cscale, clabel
autolimits = false;
limits = [35.5:0.1:36.5]; %Salt --> xz
limitslabels = limits;

scaleunits = 1.; % To scale up or down the units.

autoatt = false; % Do we pick up attributes from netcdf?
varname = varid; % Here we define the varname.
units = ''; % Here we define the var units.

colormap_type = 'jet';
colormap_inv = false;
shading_type = 'interp';

%Specific to vectorplot
legpos = [-8.5 37.5 .1  0];
legkey = '10 cm s^{-1}';
stride = 1;

if colormap_inv
    MAP = colormap(colormap_type);
    siz = size(MAP);
    colormap_type = zeros(siz);
    n = siz(1);
    for i=1:n
        colormap_type(i,:)=MAP(n+1-i,:);
    end
end

s_var = struct( ...
            'filetype', filetype, ...
            'matfile', matfile, ...
            'matdims', matdims, ...
            'file', file, ...
            'change_miss', change_miss, ...
            'new_miss', new_miss, ...
            'varid', varid, ...
            'autolimits', autolimits, ...
            'limits', limits, ...
            'limitslabels', limitslabels, ...
            'scaleunits', scaleunits, ...
            'autoatt', autoatt, ...
            'varname', varname, ...
            'units', units, ...
            'colormap_type', colormap_type, ...
            'shading_type', shading_type, ...
            'legpos', legpos, ...
            'legkey', legkey, ...
            'stride', stride);